import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      redirect: '/chat',
      children: [
        {
          path: 'chat',
          name: 'chat',
          component: () => import('../views/ChatView.vue')
        },
        {
          path: 'contact',
          name: 'contact',
          component: () => import('../views/ContactView.vue')
        },
        {
          path: 'collect',
          name: 'collect',
          component: () => import('../views/CollectView.vue')
        },
        {
          path: 'file',
          name: 'file',
          component: () => import('../views/FileView.vue')
        },
        {
          path: 'circle',
          name: 'circle',
          component: () => import('../views/CircleView.vue')
        },
        {
          path: 'video',
          name: 'video',
          component: () => import('../views/VideoView.vue')
        },
        {
          path: 'settings',
          name: 'settings',
          component: () => import('../views/SettingsView.vue')
        }
      ]
    }
  ]
})

export default router
